package chapter11.p;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import java.util.TreeSet;

public class P4 {
	public static String[] sourceName = {"Snow White","Star Wars"};
	public static int counter;
	public static String next() {
		if (counter == sourceName.length) {
			counter = 0;
		}
		return sourceName[counter++];
	}
	public static void main(String[] args) {
		String[] array = new String[4];
		for (int i = 0; i < 4; i ++) {
			array[i] = next();
		}
		List<String> list = new ArrayList<String>();
		for (int i = 0; i < 4; i ++) {
			list.add(next());
		}
		List<String> linkedList = new LinkedList<String>();
		for (int i = 0; i < 4; i ++) {
			linkedList.add(next());
		}
		Set<String> set = new HashSet<String>();
		for (int i = 0; i < 4; i ++) {
			set.add(next());
		}
		Set<String> treeSet = new TreeSet<String>();
		for (int i = 0; i < 4; i ++) {
			treeSet.add(next());
		}
		Set<String> linkedHashSet = new LinkedHashSet<String>();
		for (int i = 0; i < 4; i ++) {
			linkedHashSet.add(next());
		}

		System.out.println("Array::" + Arrays.toString(array));
		System.out.println("ArrayList::" + list);
		System.out.println("LinkedList::" + linkedList);
		System.out.println("HashSet::" + set);
		System.out.println("TreeSet::" + treeSet);
		System.out.println("LinkedHashSet::" + linkedHashSet);
	}
}
